package com.atguigu.mock.entity;

import com.atguigu.common.base.entity.AutoIdBase;
import com.atguigu.common.comment.Comment;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import java.time.LocalDateTime;

@Entity
@Getter
@Setter
@NoArgsConstructor
@Comment("订单状态流水表")
public class OrderStatusLog extends AutoIdBase {

    @Comment("订单ID")
    @ManyToOne(optional = false)
    private OrderInfo orderInfo;

    @Comment("状态")
    private Integer status;

    public OrderStatusLog(LocalDateTime createTime, OrderInfo orderInfo, Integer status) {
        super(createTime);
        this.orderInfo = orderInfo;
        this.status = status;
    }
}
